# Makefile for CS564 Minibase project.  Needs GNU make.
#
# Warning: make depend overwrites this file.

.PHONY: depend clean backup setup

MAIN=hfpage

MINIBASE=..

CC=g++-3.3

CFLAGS= -m32 -DUNIX -Wall -g

INCLUDES = -I${MINIBASE}/include -I.
LDFLAGS  = --oformat=elf32-i386

# LFLAGS= -L${MINIBASE}/lib -liberty -lm

SRCS = main.cc hfpage.cc hfp_driver.cc test_driver.cc \
		db.cc new_error.cc page.cc system_defs.cc buf.cc BMTester.cc 

OBJS = $(SRCS:.C=.o)

$(MAIN):  $(OBJS)
#all:  $(OBJS)
	 $(CC) $(CFLAGS) $(INCLUDES) $(OBJS) -o $(MAIN) $(LFLAGS)

.C.o:
	$(CC) $(CFLAGS) $(INCLUDES) -c $<

depend: $(SRCS)
	makedepend $(INCLUDES) $^

clean:
	#mv buf.o buf.o.bak	
	rm -f *.o *~ $(MAIN) $(MAKECLEANGARBAGE) 
	#mv buf.o.bak buf.o

backup:
	mkdir bak
	cp Makefile *.[Ch] bak

# Grab the sources for a user who has only the makefile
setup:
	/bin/cp -i $(MINIBASE)/src/*.[Ch] .
	-/bin/cp -i $(MINIBASE)/src/README .

# DO NOT DELETE THIS LINE -- make depend needs it 

main.o: /usr/include/stdlib.h /usr/include/features.h
main.o: /usr/include/sys/cdefs.h /usr/include/bits/wordsize.h
main.o: /usr/include/gnu/stubs.h /usr/include/gnu/stubs-32.h
main.o: /usr/include/sys/types.h /usr/include/bits/types.h
main.o: /usr/include/bits/typesizes.h /usr/include/time.h
main.o: /usr/include/endian.h /usr/include/bits/endian.h
main.o: /usr/include/bits/byteswap.h /usr/include/sys/select.h
main.o: /usr/include/bits/select.h /usr/include/bits/sigset.h
main.o: /usr/include/bits/time.h /usr/include/sys/sysmacros.h
main.o: /usr/include/bits/pthreadtypes.h /usr/include/alloca.h
main.o: ../include/hfp_driver.h ../include/test_driver.h ../include/minirel.h
main.o: ../include/da_types.h ../include/new_error.h /usr/include/assert.h
main.o: ../include/system_defs.h
hfpage.o: /usr/include/stdlib.h /usr/include/features.h
hfpage.o: /usr/include/sys/cdefs.h /usr/include/bits/wordsize.h
hfpage.o: /usr/include/gnu/stubs.h /usr/include/gnu/stubs-32.h
hfpage.o: /usr/include/sys/types.h /usr/include/bits/types.h
hfpage.o: /usr/include/bits/typesizes.h /usr/include/time.h
hfpage.o: /usr/include/endian.h /usr/include/bits/endian.h
hfpage.o: /usr/include/bits/byteswap.h /usr/include/sys/select.h
hfpage.o: /usr/include/bits/select.h /usr/include/bits/sigset.h
hfpage.o: /usr/include/bits/time.h /usr/include/sys/sysmacros.h
hfpage.o: /usr/include/bits/pthreadtypes.h /usr/include/alloca.h
hfpage.o: /usr/include/memory.h /usr/include/string.h /usr/include/xlocale.h
hfpage.o: hfpage.h ../include/minirel.h ../include/da_types.h
hfpage.o: ../include/new_error.h /usr/include/assert.h
hfpage.o: ../include/system_defs.h ../include/page.h ../include/heapfile.h
hfpage.o: ../include/buf.h ../include/db.h
hfp_driver.o: /usr/include/stdio.h /usr/include/features.h
hfp_driver.o: /usr/include/sys/cdefs.h /usr/include/bits/wordsize.h
hfp_driver.o: /usr/include/gnu/stubs.h /usr/include/gnu/stubs-32.h
hfp_driver.o: /usr/include/bits/types.h /usr/include/bits/typesizes.h
hfp_driver.o: /usr/include/libio.h /usr/include/_G_config.h
hfp_driver.o: /usr/include/wchar.h /usr/include/bits/stdio_lim.h
hfp_driver.o: /usr/include/bits/sys_errlist.h /usr/include/stdlib.h
hfp_driver.o: /usr/include/sys/types.h /usr/include/time.h
hfp_driver.o: /usr/include/endian.h /usr/include/bits/endian.h
hfp_driver.o: /usr/include/bits/byteswap.h /usr/include/sys/select.h
hfp_driver.o: /usr/include/bits/select.h /usr/include/bits/sigset.h
hfp_driver.o: /usr/include/bits/time.h /usr/include/sys/sysmacros.h
hfp_driver.o: /usr/include/bits/pthreadtypes.h /usr/include/alloca.h
hfp_driver.o: /usr/include/unistd.h /usr/include/bits/posix_opt.h
hfp_driver.o: /usr/include/bits/confname.h /usr/include/getopt.h
hfp_driver.o: /usr/include/string.h /usr/include/xlocale.h
hfp_driver.o: /usr/include/assert.h ../include/db.h ../include/page.h
hfp_driver.o: ../include/minirel.h ../include/da_types.h
hfp_driver.o: ../include/new_error.h ../include/system_defs.h
hfp_driver.o: ../include/scan.h ../include/hfp_driver.h
hfp_driver.o: ../include/test_driver.h ../include/buf.h hfpage.h
test_driver.o: /usr/include/stdlib.h /usr/include/features.h
test_driver.o: /usr/include/sys/cdefs.h /usr/include/bits/wordsize.h
test_driver.o: /usr/include/gnu/stubs.h /usr/include/gnu/stubs-32.h
test_driver.o: /usr/include/sys/types.h /usr/include/bits/types.h
test_driver.o: /usr/include/bits/typesizes.h /usr/include/time.h
test_driver.o: /usr/include/endian.h /usr/include/bits/endian.h
test_driver.o: /usr/include/bits/byteswap.h /usr/include/sys/select.h
test_driver.o: /usr/include/bits/select.h /usr/include/bits/sigset.h
test_driver.o: /usr/include/bits/time.h /usr/include/sys/sysmacros.h
test_driver.o: /usr/include/bits/pthreadtypes.h /usr/include/alloca.h
test_driver.o: /usr/include/stdio.h /usr/include/libio.h
test_driver.o: /usr/include/_G_config.h /usr/include/wchar.h
test_driver.o: /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h
test_driver.o: /usr/include/string.h /usr/include/xlocale.h
test_driver.o: /usr/include/errno.h /usr/include/bits/errno.h
test_driver.o: /usr/include/linux/errno.h /usr/include/asm/errno.h
test_driver.o: /usr/include/asm-generic/errno.h
test_driver.o: /usr/include/asm-generic/errno-base.h /usr/include/assert.h
test_driver.o: ../include/new_error.h ../include/test_driver.h
test_driver.o: ../include/minirel.h ../include/da_types.h
test_driver.o: ../include/system_defs.h /usr/include/pwd.h
test_driver.o: /usr/include/unistd.h /usr/include/bits/posix_opt.h
test_driver.o: /usr/include/bits/confname.h /usr/include/getopt.h
db.o: /usr/include/unistd.h /usr/include/features.h /usr/include/sys/cdefs.h
db.o: /usr/include/bits/wordsize.h /usr/include/gnu/stubs.h
db.o: /usr/include/gnu/stubs-32.h /usr/include/bits/posix_opt.h
db.o: /usr/include/bits/types.h /usr/include/bits/typesizes.h
db.o: /usr/include/bits/confname.h /usr/include/getopt.h /usr/include/fcntl.h
db.o: /usr/include/bits/fcntl.h /usr/include/sys/types.h /usr/include/time.h
db.o: /usr/include/endian.h /usr/include/bits/endian.h
db.o: /usr/include/bits/byteswap.h /usr/include/sys/select.h
db.o: /usr/include/bits/select.h /usr/include/bits/sigset.h
db.o: /usr/include/bits/time.h /usr/include/sys/sysmacros.h
db.o: /usr/include/bits/pthreadtypes.h ../include/db.h /usr/include/string.h
db.o: /usr/include/xlocale.h /usr/include/stdlib.h /usr/include/alloca.h
db.o: ../include/page.h ../include/minirel.h ../include/da_types.h
db.o: ../include/new_error.h /usr/include/assert.h ../include/system_defs.h
db.o: ../include/buf.h
new_error.o: ../include/new_error.h /usr/include/assert.h
new_error.o: /usr/include/features.h /usr/include/sys/cdefs.h
new_error.o: /usr/include/bits/wordsize.h /usr/include/gnu/stubs.h
new_error.o: /usr/include/gnu/stubs-32.h /usr/include/string.h
new_error.o: /usr/include/xlocale.h /usr/include/stdio.h
new_error.o: /usr/include/bits/types.h /usr/include/bits/typesizes.h
new_error.o: /usr/include/libio.h /usr/include/_G_config.h
new_error.o: /usr/include/wchar.h /usr/include/bits/stdio_lim.h
new_error.o: /usr/include/bits/sys_errlist.h /usr/include/stdlib.h
new_error.o: /usr/include/sys/types.h /usr/include/time.h
new_error.o: /usr/include/endian.h /usr/include/bits/endian.h
new_error.o: /usr/include/bits/byteswap.h /usr/include/sys/select.h
new_error.o: /usr/include/bits/select.h /usr/include/bits/sigset.h
new_error.o: /usr/include/bits/time.h /usr/include/sys/sysmacros.h
new_error.o: /usr/include/bits/pthreadtypes.h /usr/include/alloca.h
page.o: ../include/page.h ../include/minirel.h ../include/da_types.h
page.o: ../include/new_error.h /usr/include/assert.h /usr/include/features.h
page.o: /usr/include/sys/cdefs.h /usr/include/bits/wordsize.h
page.o: /usr/include/gnu/stubs.h /usr/include/gnu/stubs-32.h
page.o: ../include/system_defs.h
system_defs.o: /usr/include/stdio.h /usr/include/features.h
system_defs.o: /usr/include/sys/cdefs.h /usr/include/bits/wordsize.h
system_defs.o: /usr/include/gnu/stubs.h /usr/include/gnu/stubs-32.h
system_defs.o: /usr/include/bits/types.h /usr/include/bits/typesizes.h
system_defs.o: /usr/include/libio.h /usr/include/_G_config.h
system_defs.o: /usr/include/wchar.h /usr/include/bits/stdio_lim.h
system_defs.o: /usr/include/bits/sys_errlist.h ../include/minirel.h
system_defs.o: ../include/da_types.h ../include/new_error.h
system_defs.o: /usr/include/assert.h ../include/system_defs.h ../include/db.h
system_defs.o: /usr/include/string.h /usr/include/xlocale.h
system_defs.o: /usr/include/stdlib.h /usr/include/sys/types.h
system_defs.o: /usr/include/time.h /usr/include/endian.h
system_defs.o: /usr/include/bits/endian.h /usr/include/bits/byteswap.h
system_defs.o: /usr/include/sys/select.h /usr/include/bits/select.h
system_defs.o: /usr/include/bits/sigset.h /usr/include/bits/time.h
system_defs.o: /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h
system_defs.o: /usr/include/alloca.h ../include/page.h ../include/buf.h
